%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NotesCnd - Visible colour notes and Conditional texts
%
% Authors: Fabio Jun Takada Chino, Caetano Traina Jr.
% File `NotesCnd.sty'.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{notescnd} [2003/11/04 v1.1 Visible colour notes and Conditional texts(GBdI)]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Required Packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{colortbl}
\RequirePackage{ifthen}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Initial state - Default: Notes are not visible
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newboolean{VisibleNotes}
\setboolean{VisibleNotes}{false}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Commands
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\defineconditionaltext}[2][false]{
   \newboolean{#2}
   \setboolean{#2}{#1}
}

\newcommand{\setconditionaltext}[2][false]{
   \setboolean{#2}{#1}
}

\newcommand{\conditionaltext}[2]
   {\ifthenelse {\boolean{#1}} {#2} {} }

\newcommand{\visiblenotes}[0]{
   \setboolean{VisibleNotes}{true}
}

\newcommand{\invisiblenotes}[0]{
   \setboolean{VisibleNotes}{false}
}

\newcommand{\note}    [1]{\ifthenelse{\boolean{VisibleNotes}}{{\color{red}{[\it {#1}}]}}{}}
\newcommand{\notemark}[1]{\ifthenelse{\boolean{VisibleNotes}}{{\color{red}{#1}}}{{#1}}}

%
% End of file `NotesCnd.sty'.



{\ifthenelse{ \boolean{VisibleNotes} }{{\color{red}{\it [{#1}]}}}{}}